import config from '../../utils/config';

export default function poolQueryAPI(api) {
  return {
    //获取券池名称
    findName: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/findNameByAsset`, query),

    //入池标的下拉
    findBd: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/findListById`, query),

    //获取标签下拉
    findTags: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/findTag`, query),

    //获取入池人员下拉
    findUser: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/findUser`, query),

    //获取发行主体
    findCompany: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/findCompany`, query),

    //查询所有
    findALL: (query) => api.post(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/findAll`, query),
    //查询超链接表格数据
    findSuperData: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/findHistory`, query),

    //入用户池下的券池名称
    searchPoolName: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/checkPool`, query),

    //入用户池下的标签
    searchPoolTag: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/checkTag`, query),

    //如用户池
    InPool: (query) => api.post(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/addUserItem`, query),

    //出用户池
    outPool: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/deleteSecurityPoolItemById`, query),

    //修改投资额度
    saveInvestmentAmounts: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/editInvestmentAmounts`, query),
    //修改内部评级
    saveInternalRating: (query) => api.get(`${config.interfaces.type5}portfolio-server/SecurityPoolItem/editBondRating`, query),
  };
}
